package cs342.project1.mathNotebook.gui;

import java.awt.Component;

import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;

import cs342.project1.mathNotebook.gui.RadioButtonPanel;

class RadioButtonRenderer extends RadioButtonPanel implements
	TableCellRenderer {
	RadioButtonRenderer(String[] strs) {
		super(strs);
}

public Component getTableCellRendererComponent(JTable table,
  Object value, boolean isSelected, boolean hasFocus, int row,
  int column) {
if (value instanceof Integer) {
  setSelectedIndex(((Integer) value).intValue());
}
return this;
}
}